#pragma once

#include <atlimage.h>

typedef struct CvSize
{
	int width;
	int height;
}
CvSize;

void resize(const unsigned char *src, CvSize ssize, unsigned char *dst, CvSize dsize);

BOOL ImageToRGB(const ATL::CImage& Image, UCHAR* pR, UCHAR* pG, UCHAR* pB);

BOOL RGBToImage(const UCHAR* pR, const UCHAR* pG, const UCHAR* pB, ATL::CImage& Image);

BOOL ResizeImage(const ATL::CImage & Image, INT nWidth, INT nHeight,
				 UINT * pnSize, BYTE ** ppBitmap, INT * pnComplexScore);
////////////////////////////////////////////////

#ifdef __cplusplus
extern "C" {
#endif

	void canny(const unsigned char* src, unsigned char* dst, int width, int height, 
		double low_thresh, double high_thresh);
	void bgr2gray(const unsigned char* src, int srcstep,
		unsigned char* dst, int dststep, int width, int height,
		int src_cn, int blue_idx);
	double complexity(const unsigned char* src, int width, int height);

#ifdef __cplusplus
}
#endif